<template>
  <div ref="mapDiv"></div>
</template>

<script setup lang="ts">
// @ts-nocheck
import type { Response } from 'open-data-v/base'
import type TianMapComponent from '../config'
import type { TianMap } from '../type'
import { useEchart } from '../../../hooks'
import { onMounted, ref } from 'vue'

const mapDiv = ref<HTMLElement>()
var map = null
const initMap = () => {
  // 初始化地图
  var T = window.T;
  map = new T.Map(mapDiv.value, {projection: "EPSG:4326",});
  // 设置显示地图的中心点和级别
  // 116.40969, 39.89945
  map.centerAndZoom(new T.LngLat(114.5120205423622, 38.04291764925318), 11);
};
const { resizeHandler } = useEchart(mapDiv)
onMounted(() => {
  initMap()
})

</script>
